(1) Field of the Invention
The present invention relates to a data processing apparatus of a compact digital disk drive in which digital data is read from or written to a compact digital disk on a sector-unit basis, the digital data being temporarily stored in a buffer memory. The data processing apparatus of the present invention is applicable to various types of compact digital disk drives such as CD-ROM (compact disk-read only memory) disk drive, CD-R (compact disk-recordable) disk drive and CD-RW (compact disk-rewritable) disk drive.
(2) Description of the Related Art
FIG. 1 shows a compact disk drive in which a data processing apparatus is included. In the compact disk drive of FIG. 1, not only a decoding process which reads data from a compact disk (CD) 10 and produces a sequence of serial digital data from the read data, but also an encoding process which performs an encoding of data output from a host computer and produces a sequence of serial digital data to be written to the CD 10 is performed.
As shown in FIG. 1, the compact disk drive includes a reading unit 11 which reads out data from the CD 10 and outputs an analog signal indicating the read data. A CD decoding unit 13 performs the EFM (eight-to-fourteen modulation) demodulation of the signal from the reading unit 11 so that a sequence of serial digital data is produced from the read data. A data processing unit 15 performs the data processing of the sequence of serial digital data from the CD decoding unit 13 and outputs the processed data. The processed data from the data processing unit 15 is transferred to a host computer 19 via an external interface such as a SCSI interface or an ATAPI interface. The processed data from the data processing unit 15 is temporarily stored in a buffer memory 17 such as a RAM (random access memory).
Further, in the compact disk drive of FIG. 1, the data processing unit 15 performs the data processing of data output from the host computer 19 via the external interface. For example, the data processing is performed to carry out an encoding of the data from the host computer 19. The data to be processed by the data processing unit 15 is temporarily stored in the buffer memory 17. A CD encoding unit 14 performs the encoding of the data output by the host computer 19 through the data processing unit 15, performs the EFM modulation of the coded data, and outputs a sequence of the modulated signal. A writing unit 12 writes the modulated signal at the output of the CD encoding unit 14 to the CD 10.
FIG. 2 shows a flow of data processing which is performed by the compact disk drive during the decoding process.
In FIG. 2, a decimal number in parentheses attached to a name of each field denotes the number of bytes indicating the length of data included in the field.
The compact disk drive performs the reading of data from the CD 10 on a frame-unit basis. In FIG. 2, (a) shows a format of one frame of record data obtained after the EFM demodulation of the read data from the CD 10. As shown, the frame 21 contains a subcode (1 byte), a first main data (12 bytes) followed by parity bits (4 bytes), and a second main data (12 bytes) followed by parity bits (4 bytes). The main data includes digital stereophonic musical signals. The subcode includes time signal bits and pause signal bits. The parity bits are used for an error correction decoding.
In FIG. 2, (b) shows a subcode 22 (1 byte) and a main data 23 (24 bytes) which are included within one frame (or the frame 21). The main data 23 is obtained after the error correction decoding is performed with the parity bits and the first main data and the second main data are combined.
The subcodes which are collected from 98 frames and have 96 bytes of data form a part of one subcode frame. The sequence of the main data which are collected from 98 frames and include 98 main data items, each having 2352 bytes of data, constitute one main data block. In FIG. 2, (c) shows a format of one block of the record data including a subcode block 24 and a main data block 25. As shown, the subcode block 24 includes a sync pattern (2 bytes) and a subcode (96 bytes). The sync pattern is used for detecting the starting point of the subcode block in the record data. The main data block 25 includes 2353 bytes of the main data 23 from the 98 frames.
There are two major formats of record data obtained by reading of the compact digital disks: the CD-DA format and the CD-ROM format. The CD-DA format is used for the reproducing and recording of musical signals. The CD-ROM format is used for the reproducing and recording of digital data signals. A determination as to whether the read data is in the CD-DA format or in the CD-ROM format is made by referencing a specific control bit included in the subcode.
In a case in which the read data is in the CD-DA format (or the musical signals), the CD decoding unit 13 produces the sequence of digital data in the format indicated by (c) in FIG. 2. On the other hand, in a case in which the read data is in the CD-ROM format (or the digital data signals), a higher level of reliability of the reproduced data is required. In the latter case, the data processing unit 15 performs error correction decoding of the digital data at the output of the CD decoding unit 13 for this purpose. In the case of the CD-ROM format, one block of the record data is treated as one sector.
In FIG. 2, (d) shows a mode-1 CD-ROM format of one sector (or one block) of the record data produced by the data processing unit 15. As shown, the main data block 27 of the CD-ROM format contains a sync pattern (12 bytes), a header (4 bytes), a user data (2048 bytes), an error detection code (EDC) (4 bytes), a set of zero bits (8 bytes), and an error correction code (ECC) (276 bytes).
In FIG. 2, (e) shows a user data 29 which is obtained from the main data block 27 at the output of the data processing unit 15 and sent to the host computer 19. As described above, the read data at the output of the reading unit 11 is supplied to the CD decoding unit 13. The CD decoding unit 13 performs the data processing in accordance with the flow indicated by (a) through (c) in FIG. 2. After this, the data processing unit 15 performs the data processing in accordance with the format indicated by (d) in FIG. 2. The user data at the output of the data processing unit 15 is sent to the host computer 19 via the external interface as indicated by (e) in FIG. 2. In the data processing unit 15, the correlation between the memory areas of the buffer memory 17 and the various fields of the record data including the user data, the subcodes and the error codes is defined, and management of the record data using the correlation is carried out.
FIG. 3 shows a method of management of record data in buffer memory areas used by a conventional data processing apparatus. As shown in FIG. 3, in the conventional data processing apparatus, the memory areas of the buffer memory are divided into a user data area, an error code area and a subcode area. In the user data area, "n" data items including the user data#1 through the user data#n are sequentially arranged. In the error code area, "n" data items including the error code#1 through the error code#n are sequentially arranged. In the subcode area, "n" data items including the subcode#1 through the subcode#n are sequentially arranged.
In the method of data management of FIG. 3, the address (or the memory location) of the buffer memory 17 for the data item to be processed by the conventional data processing apparatus must be computed from the base address (or the starting address) of the related memory area and the offset of the data item in the related memory area in the respective steps of the data processing during the reading of data from the disk or during the writing of data to the disk. That is, it is necessary that both the starting address and the offset be set in a register and the addition of the starting address and the offset be executed by using an adder, in order to determine the address of the buffer memory 17 for the data item to be processed. The register and the adder require a size capacity to hold all the bits of the address to be determined. Further, the method of the data management of FIG. 3 requires a look-up table which defines the relationship between the memory areas of the buffer memory 17 and the various fields of the record data including the user data, the subcodes and the error codes for the respective sectors. The handling of the register and the adder using the look-up table is a complicated task.
In recent years, high speed data processing of compact digital disk drives such as CD-ROM disk drive, CD-R drive and CD-RW disk drive is increasingly demanded. However, it is difficult for the conventional data processing apparatus to satisfy the demand for increasing the data processing speed.